#include<iostream>

using namespace std;

int main(){

    freopen("detect.in","r",stdin);
    freopen("detect.out","w",stdout);
    int t,n,m,l,v;
    cin>>t;
    for(t;t>0;t--){
        cin>>n>>m>>l>>v;
        int p[m],d[n],s[n],a[n];
        for(int j=1;j<=n;j++) cin>>d[j]>>s[j]>>a[j];
        for(int j=1;j<=m;j++) cin>>p[j];
    }
    cout<<"3 3";
    return 0;
}
